package cn.middle.remote.handler.decodec;

import java.util.List;

import cn.middle.remote.message.BaseSignal;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;

public interface Codec<T extends BaseSignal> {
	
	void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out,int beginIndex) throws Exception;
	
	void encode(ChannelHandlerContext ctx, T msg, ByteBuf out) throws Exception;

}
